package com.cxh.mchat.common.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author cxh
 * @date 2021/12/27 15:01
 **/
@Data
@Component
public class SMProperties {
    public static String privateKey;
    public static String publicKey;
    public static String sm4Key;

    @Value("${sm.private_key}")
    public void setPrivateKey(String privateKey) {
        SMProperties.privateKey = privateKey;
    }

    @Value("${sm.public_key}")
    public void setPublicKey(String publicKey) {
        SMProperties.publicKey = publicKey;
    }

    @Value("${sm.sm4_key}")
    public void setSm4Key(String sm4Key) {
        SMProperties.sm4Key = sm4Key;
    }
}
